#!/usr/bin/env python

'''\
INSTRUCTIONS:

Create plot of the sine and cosine functions for over an x-interval
from -2*pi to 2*pi.  Add axes labels "x" for the x-axis and
"sin(x), cos(x)" for the y-axis.

HINT: Run this script from  "ipython --pylab"  using  "%run ex01sincos.py"
'''


import numpy as np
import matplotlib.pyplot as plt

plt.clf()

x=np.linspace(-2*np.pi,2*np.pi)  
y=np.cos(x)
z=np.sin(x)

fig=plt.figure()
ax1=fig.add_subplot(1, 1, 1)
ax2=fig.add_subplot(1, 1, 1)
ax1.plot(x,y)
ax2.plot(x,z)
ax1.set_ylabel('sin(x), cos(x)')
ax1.set_xlabel('x-axis')

# clear the current figure



# redraw and display the figure window
#plt.draw()
plt.show()
